# Configuration directives required by the setuphandlers.py
# script files	
# Change these to suit your enviornemt
# TODO Delete this file after install

#############################################
#	Auth Properties setup parameters		#
#											#
#############################################
AUTH_LOGIN_URL = "/login_form"
AUTH_LOGOUT_URL = "/logout"
AUTH_REQUIRE_LOGIN_URL = "/require_login"
AUTH_REGISTER_URL = "/join_form"



#############################################
# Session Plugin Properties                 #
#############################################
SESSION_PLUGIN_PROPERTIES = \
{'cookie_domain': '',
'cookie_lifetime': 0,
'cookie_name': '__ac',
'mod_auth_tkt': True,
'path': '/',
'timeout': 43200}

SESSION_SHARED_SECRET = \
"C311B4EFDDF247B4432AC309E87CC9B548E27972BFD456DFEF072515"

#############################################
# Database Connection Object Settings		#
# Z Psycopg 2 Database Connection 			#
#############################################
DB_CONNECTION_ID = "PsycoPgConnectionAuthUU"
DB_CONNECTION_TITLE = " Postgres Authentication Database Connection"
DB_NAME = "pas"
DB_USERNAME = "pas"
DB_PASSWORD = "pas"
DB_CONNECTION_STRING = "dbname=%s user=%s password=%s" %(DB_NAME, DB_USERNAME, DB_PASSWORD)
DB_USE_ZOPE_INTERNAL_DATETIME = True

#use 2 for Serializable, 1 for Read commited
DB_TRANSACTION_ISOLATION_LEVEL = 2
DB_ENCODING = "UTF-8"


#############################################
# Database specific parameters requred to	#
# to set up table mapping to SQLAuth Plugin	#
# properties. Should match the schemas and	#
# and relations in your database			#
#############################################

SG_GROUPS_TABLE = "pas.groups"
SG_GROUPNAME_COLUMN = "groupname"
SG_USERNAME_COLUMN = "username"

SP_USERS_TABLE = "pas.users"
SP_USERS_COLUMN_USERNAME = "username"
SP_USERS_COLUMN_PASSWORD = "password"

# column mappings for user properties
# format <plone property>/<db column>
# double escaping is to allow for new lines in property values
SP_COLUMN_MAPPING = \
"email/email\\r\\nfull_name/fullname\\r\\nemail_address/email\\r\\ncountry/my_country"

SR_ROLES_TABLE = "pas.roles"
SR_ROLES_COLUMN_USERNAME = "username"
SR_ROLES_COLUMN_ROLENAME = "rolename"

# not using this setting in this setup
#SP_ROLES_MAPPING = []

SU_USERS_TABLE = "pas.users"
SU_USERS_COLUMN_USERNAME = "username"
SU_USERS_COLUMN_PASSWORD = "password"
SU_USERS_DEFAULT_ENCRYPTION = "md5"

# FOLDERS TO CREATE IN THE ROOT DIRECTORY OF THE SITE
ROOT_FOLDER_LIST = "apex,ldg,lrp"


#############################
#	Language settings for 	#
#	Plone					#
#############################
DEFAULT_LANGUAGE = 'en'
SUPPORTED_LANGUAGES = ['ar', 'en', 'fr', 'pt', 'es', 'sw']
DISPLAY_FLAGS = 1

###############################
#	Default CYNIN workspaces  #
###############################
WS_CONTENT_TYPE = "ContentSpace"
try:
    from ubify.policy.config import contentroot_details
except ImportError:
    HAS_CYNIN = False
else:
    HAS_CYNIN = True

# WORKSPACES TO CREATE IN THE ROOT DIRECTORY OF THE SITE
WKSPACES_LIST = (
    ('legislative-process', 'Legislative Process'),
    ('information-and-research', 'Information and Research'),   
    ('information-and-communication-technology', 'Information and Communication Technology'),
    ('communication-and-public-information', 'Communication and Public Information'))

